import request from '@/utils/request';
export const serviceHead = '/omsystem'; // 项目前缀

// 查询订单列表
export function getListService (params) {
  return request({
    url: `${serviceHead}/order/list`,
    method: 'get',
    params: params
  });
}

// 查询订单详细
export function getDetailService (id) {
  return request({
    url: `${serviceHead}/order/${id}`,
    method: 'get'
  });
}

// 新增订单
export function addService (params) {
  return request({
    url: `${serviceHead}/order`,
    method: 'post',
    data: params
  });
}

// 修改订单
export function updateService (params) {
  return request({
    url: `${serviceHead}/order`,
    method: 'put',
    data: params
  });
}

// 删除订单
export function delService (id) {
  return request({
    url: `${serviceHead}/order/${id}`,
    method: 'delete'
  });
}

// 查询订单统计
export function getOrderTotal (params) {
  return request({
    url: `${serviceHead}/order/count`,
    method: 'get',
    params
  });
}